export function eventTrigger(key: any, emits: any) {
  return function () {
    if (key) {
      emits(key, ...arguments);
    }
  };
}
// 树形结构的属性
export interface TreeProps {
  props: any;
  modelValue?: any;
  // 树形结构的属性和事件
  data?: any[];
  checkStrictly?: boolean;
  defaultCheckedKeys?: any[];
  currentNodeKey?: any;
  filterMethod?: any;
  children?: string;
  value?: string;
  label?: string;
  showCheckbox?: boolean;
  expandOnClickNode?: boolean;
  emptyText?: any;
  highlightCurrent?: any;
  checkOnClickNode?: any;
  checkOnClickLeaf?: any;
  defaultExpandedKeys?: any;
  indent?: any;
  icon?: any;
  itemSize?: any;
}
// 虚拟树可调用的方法
export const TreeMethods = () => ({
  filter: null,
  getCheckedNodes: null,
  getCheckedKeys: null,
  setCheckedKeys: null,
  setChecked: null,
  setExpandedKeys: null,
  getHalfCheckedNodes: null,
  getHalfCheckedKeys: null,
  getCurrentKey: null,
  getCurrentNode: null,
  setCurrentKey: null,
  getNode: null,
  expandNode: null,
  collapseNode: null,
  setData: null,
  scrollTo: null,
  scrollToNode: null,
});
// 虚拟树可调用的事件
export const TreeEvent = () => ({
  nodeClick: null,
  nodeContextmenu: null,
  checkChange: null,
  currentChange: null,
  nodeExpand: null,
  nodeCollapse: null,
  nodeDrop: null,
});
// select组件的属性
export interface SelectProps {
  multiple?: any;
  disabled?: any;
  valueKey?: any;
  size?: any;
  clearable?: any;
  collapseTags?: any;
  collapseTagsTooltip?: any;
  multipleLimit?: any;
  name?: any;
  effect?: any;
  autocomplete?: any;
  placeholder?: any;
  allowCreate?: any;
  remoteShowSuffix?: any;
  loading?: any;
  loadingText?: any;
  noMatchText?: any;
  noDataText?: any;
  popperClass?: any;
  reserveKeyword?: any;
  defaultFirstOption?: any;
  teleported?: any;
  appendTo?: any;
  persistent?: any;
  automaticDropdown?: any;
  clearIcon?: any;
  fitInputWidth?: any;
  suffixIcon?: any;
  tagType?: any;
  tagEffect?: any;
  validateEvent?: any;
  offset?: any;
  showArrow?: any;
  placement?: any;
  fallbackPlacements?: any;
  maxCollapseTags?: any;
  popperOptions?: any;
  ariaLabel?: any;
  emptyValues?: any;
  valueOnClear?: any;
  tabindex?: any;
}
// select组件可调用的方法
export const SelectMethods = () => ({
  focus: null,
  blur: null,
  selectedLabel: null,
});
// select组件可调用的事件
export const SelectEvent = () => ({
  change: null,
  visibleChange: null,
  clear: null,
  blur: null,
  focus: null,
  popupScroll: null,
});
export interface SelectTreeProps extends TreeProps, SelectProps {
  // 是否显示全选按钮
  appendSelectAll?: boolean;
  closeOnCheck?: boolean;
  width?: any;
}
